package view.views.dialogContentViews;

import java.awt.FlowLayout;

import javax.swing.BoxLayout;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextField;

import model.Constants;
import model.Subnet;
import view.components.IpComboBox;

public class IpListPanel extends JPanel {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	private IpComboBox ipBox = null;
	private final JTextField textField;

	public IpListPanel(Subnet sub) {
		

		this.setLayout(new BoxLayout(this, BoxLayout.Y_AXIS));

		JPanel contentPanel = new JPanel(new FlowLayout(FlowLayout.LEFT));

		JLabel title = new JLabel(Constants.CHOOSEIP);

		contentPanel.add(title);

		this.add(contentPanel);

		JPanel ipBoxPanel = new JPanel(contentPanel.getLayout());

		ipBox = new IpComboBox(sub);

		ipBoxPanel.add(ipBox);

		this.add(ipBoxPanel);

		JPanel textLabelPanel = new JPanel(contentPanel.getLayout());

		JLabel textLabel = new JLabel(Constants.ADDIPTEXT);

		textLabelPanel.add(textLabel);

		this.add(textLabelPanel);

		JPanel textPanel = new JPanel(contentPanel.getLayout());

		textField = new JTextField(20);
		textField.setBorder(null);

		textPanel.add(textField);

		this.add(textPanel);



	}

	public IpComboBox getIpBox() {
		return ipBox;
	}

	public JTextField getTextField() {
		return textField;
	}

}


